package com.sparrow.source.common.enums;

import java.util.Arrays;
import java.util.stream.Collectors;

/**
 * @author bryceyung
 * @since 2024/12/11
 */
public enum MatchEnums {

    /**
     *
     */
    MATCH_SUCCESS(1,"认证成功"),


    MATCH_FAILED(2,"认证失败"),

    MATCH_DUPLICATE(30,"重复打卡");


    private Integer value;

    private String desc;

    public String getDesc() {
        return desc;
    }

    public Integer getValue(){
        return value;
    }

    MatchEnums(Integer value, String desc) {
        this.value = value;
        this.desc = desc;
    }

    public static MatchEnums getByVal(Integer value){
        return Arrays.stream(MatchEnums.values()).filter(c -> c.getValue().equals(value)).collect(Collectors.toList()).get(0);
    }
}
